Log In  
[back to top]

[ :: Read More :: ]

hg
by dw817
Cart #hg-6 | 2019-11-12 | Code ▽ | Embed ▽ | No License
4


Hold (O) to see the cycle of life.
TO LOAD THIS CART in immediate mode type:

load #hg

While the cart I'm working on now (and have been for several days) is quite a bit bigger than 560-bytes (hundreds of lines), seeing Conway's life program reiterated reminded me of my Father.

For years ago he wrote a program in Turbo Pascal he called the "Cycle Of Life."

In it, he had 3-different colored pixels randomly appearing on the screen in a 640x480 screen.

He told me that one pixel chases the other and the last chases the first. I really didn't understand him so he explained it to me.

Red chases yellow.
Yellow chases green.
Green chases red.

I thought about it for a-while and thought that was a pretty nifty thing. He later went on to make a very complex program he simply called, "LIFE." where there were gray dots all moving on the screen. If one got boxed in though he would turn red and start killing the gray.

If enough people saw red dots (bodies), they would take it upon themselves to become a policeman (turning blue), and running into the killer would apprehend him. (turning him into a white pixel), imprisonment my Dad said. Where he could not move from that spot but could still be seen by other citizens.

Then if they moved for a long time without finding any killers (red dots), they would revert back to gray (citizen) and the life program would continue, although the prisoner would remain.

At the time I thought it was a very complex thing and really beyond what I could code.

But I did understand the earlier program he wrote where 3-colors chased each other.

Thinking to the chess game, the foxes and the geese, I thought it would be interesting to change it from colored dots to actual pictures. Where red was the fox, yellow was not geese but rabbits as I liked drawing rabbit icons back then (S1), and the green was the grass.

So the new cycle of life was:
Foxes eat rabbits.
Rabbits eat grass.
Grass eats foxes.

When I wrote this back in QBasic so many years ago, someone questioned how the grass could eat the foxes. A valid question !

I told them that the foxes were carnivorous and grass means no meat, so they die out if it encroached on their territory. Ah, a good enough answer for the time I thought. :D

And thus is what you have here, tweetable, meaning it is 560-characters or less.

I think it demonstrates an interesting idea that is quite a bit different than "Conway's" game of life.

It also includes the sprites for the grass, foxes, and rabbits, as part of the source-code so it runs right out of the box ! I call it, "The Hunting Grounds."

Here is the source-code, exactly at 560-chars.

-- hunting grounds
-- written by dw817 (11-12-19)
r,m,n,e,d,c,s=rnd,mget,mset,{2,3,1},{-1,0,0,-1,1,0,0,1},0,"3000000049404940666066600b000000044444006e606e6000300000499999406e606e600000000044a9a44066666660000000300449440006e6e60000000b00004940000666660000003000000e000000676000"
for i=0,167 do sset(i%24+8,i/24,"0x"..sub(s,i+1,i+1))end
for i=0,224 do mset(i%15,i/15,r(3)+1)end
repeat
x,y=r(15),r(15)s,w=flr(r(4))*2+1,m(x,y)
h,v=x+d[s],y+d[s+1]
if m(h,v)==e[w]then n(h,v,w)end
c=(c+1)%32if c==31 then cls()map(0,0,4,4,15,15)repeat flip()until btn(4)end until z

Hold down the (O) key and watch the CYCLE OF LIFE ...

VVhat's going on ?

Random foxes, rabbits, and grass are drawn first on the playfield.

[8x8]
A random position is chosen.

[8x8]
A random direction is chosen. One of up, down, left, or right.

If that random spot can "eat" in that single direction chosen, it will convert that food to the same identity as itself thereby "spawning."

Then the cycle is repeated.

[8x8]

  • The foxes will win if the rabbits eat all the grass.
    [Predator] Foxes
    [Food] Rabbits

[8x8]

  • The rabbits will win if the grass manages to push out all the foxes.
    [Predator] Rabbits
    [Food] Grass

[8x8]

  • The grass will win if the foxes eat all the rabbits.
    [Predator] Grass
    [Food] Foxes (They encroach on their area and drive them out).

And WHO WILL WIN ? Will it be the foxes, the rabbits, or the grass ?
It is entirely possible for one to fill the field entirely.

P#69852 2019-11-12 20:31 ( Edited 2022-11-13 21:54)

[ :: Read More :: ]

[128x128]

You may have seen a few carts show impossible logos both in the BBS and in Splore. Impossible in the fact that you scan both code and memory to see where the logo is but it's nowhere to be found.

So - just how did they get that logo on there in the first place ?

Well, with a little bit of trickery, actually. You can do the same thing in truth.

Load up your cart. In immediate mode type:

export spr.png

to export your tiles to a temporary file.

Then type:

import logo.png

The 128x128 logo that you want.

At the bottom of your code or the first lines in _init() add:

memcpy(24576,0,8192)
repeat until forever

Run that. when the logo appears, press F7 to save that as the logo for your cart.
Press [ESC] to exit.

Then return back to your code, remove those two lines of code and back in immediate mode type:

import spr.png

To recover your original sprites, and you are done.

Save your program if you like and of course to export to the BBS use either SAVE "@CLIP" or save your program as a .PNG, and you are done.

When a preview of your game appears, it will show the logo you imported that for both the code and images that are no longer there.

HOPE THIS HELPS !

P#69767 2019-11-09 23:52 ( Edited 2022-01-01 02:47)

[ :: Read More :: ]

sa
by dw817
Cart #sa-0 | 2019-11-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


To load this program in Pico-8, type:

load #sa

Shuffling a deck of cards on a computer has come a long way, hasn't it ?

The classic method is to go through each card one at a time and shuffle them by taking the index card and swapping it with a random card anywhere in the deck.

The problem with this method is that after a shuffle if the first card is say 2 of Spades, then you already know the next card will be Ace of Spades. So, yeah, it's not perfect.

Another way is to create a table picking a random number from 0-51 adding it to an array until the deck is filled. This will work but it can be slow once it gets near the end picking that random number from 0-51 to get that very last card that is not in the deck.

Thus future coding now has two interesting commands, ADD and DEL.

Add will do just that, add a value on to an existing array placing it right at the end. If it's the first item, obviously it goes in the first place. But each new successive item is placed on the end. So if you wrote code like this:

a={}
add(a,1)
add(a,2)
add(a,3)

Then a would be an array starting with index 1 and contain 1, 2, and 3.

Now here is where DEL comes in and it's quite powerful what it does. In older code if we wanted to remove an item from an array you would have to create a reverse FOR/NEXT loop to copy all the older items one step above the item you were removing. I did this back in S2 and it was not speedy.

However, you do not need to do this in Pico-8, for instance, let's take our original code and remove the middle item:

a={}
add(a,1)
add(a,2)
add(a,3)
del(a,a[2])

Now the results are 1, 3. So with this in mind it does indeed ADD and DELETE items from the array. Doing so we can now make a proper SHUFFLE routine, where every single item in the array can be plucked out randomly, added to a separate array with ADD and neatly sealed closed from the original array with the DEL command.

And it does not swap existing items but actually pulls out each and every single item randomly to be placed in a 2nd growing array.

That is exactly what I am doing in this code, note two functions of use. SHUFFLE() which can shuffle a numeric or string array of any size as well as a function just for this code called PLOTCARD() which draws a small playing card on the screen.

Combining these functions you get a very good card shuffling routine that needs only one pass to make a perfect and completely random shuffle of a deck of cards, using our friend commands, ADD and DEL.

P#69671 2019-11-05 21:42 ( Edited 2019-11-05 22:35)

[ :: Read More :: ]

Was just experimenting with arrays, starting to understand NEW and DEL a little better, when I came across this:

set={}
for i=1,6 do
  set[i]=i
end
newset=set
newset[3]=0
?set[3]

What gives ? The correct answers should be "3."

Normal BASIC with "newset=set" would just copy the array to a new array and let you work with it as a new array. You can't do this in Pico-8 as apparently it's just a shortcut to the original array ?

Is there a way to copy one array to another easily ? Like newset=set{} or something ?

P#69666 2019-11-05 20:27 ( Edited 2019-11-05 20:29)

[ :: Read More :: ]

dx
by dw817
Cart #dx-4 | 2019-11-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


To load this cart in Pico-8, type:

load #dx

VVhat's new ?

  • Added visible footprints so you can see where you've been.
  • Now does not show maze-drawing process.
  • Fixed up sprites a bit.
  • Am researching recursion as a possible maze-maker.

There are 2-ways you can navigate this maze.

  1. Just using your footprints as a guide.
  2. Press (X) to turn on the auto-mapper and use that as a guide.

This is not so much a game (although you can play it) as a proof of concept.

Something I've wanted to do is have code that automatically builds a fairly large dungeon, in this case 125x125 tiles is a fine testing area and build a maze that cuts the edge of the walls intelligently leaving space for the player to move around, so the corridors are not 1x1 tile in size but actually 3x3 floor space and 2x2 walls.

When you start getting down to having a regular sized dungeon you'll find that the mapper space provided really isn't very big, a maximum of 128x64 and that's only if you sacrifice some of your sprite space for it.

What better way to use the mapper then to create an array for what you need in the map, in this case 125x125 and then draw only the bits you need to the mapper and then just use the MAP() command for that particular area only.

Then intelligently draw black edges around the walls to separate them from the floor, something the default Pico-8 mapper cannot yet do but is included in this code.

Then you get to explore using the arrow keys. Hold two arrow keys to travel a bip-bopping diagonal.

Hold (O) to run instead of walk, and tap (X) to bring up a map of where you've traveled so far or again to hide it so you can focus on the full display.

Your mission is a fairly easy one. Locate the nice cottage in the center of the dungeon and touch it to complete the quest. Know well though that from where you start, there is only one guaranteed path to reach it. And that path is randomized every single time you start a new game.

Also includes torches that flicker, view the code to see how it's done.

Also see unique code of:

  • Constants, _1=true, _0=false.
  • Correct sgn() function where 0 returns 0.
  • Range function where a number is checked to be within a range and returns true if it is.
  • Good generate random number within set range. Negative number ranges are also acceptable.
P#69643 2019-11-04 23:22 ( Edited 2019-11-24 18:18)

[ :: Read More :: ]

I was just watching a video about Loot Boxes and how Online games charge players real money in order to gain these items, which apparently are random items that can benefit the player to progress further in them.

Outlawed in several countries apparently.

https://www.pcgamer.com/the-legal-status-of-loot-boxes-around-the-world-and-whats-next/

And this is new stuff for me, the first I've heard of it. I know, now you can think on that a bit if you like. Sometimes I get so wrapped up in coding I'm unaware of the world around me.

However, I was thinking this might be something good and nice to have for Pico-8.

Not real loot boxes, not the ones that cost money anyways. But no, perhaps missions a player could go on in some of these advanced Pico-8 carts. The reward ? A loot box, completely free, earned by the dedication (and perhaps perspiration) of the player to go beyond the call of duty on side-quests and other items that the average player may skip over in their haste to see the ending to the game.

It's something to consider, and would definitely be icing on the cake of very fine and excellent Pico-8 carts already produced and written or in the process of being written.

There was something existing like this with the Gacha game by the very talented, @enargy.

https://www.lexaloffle.com/bbs/?tid=31955

And while it's grand fun, unfortunately that's all it was, a bit of a loot box. Where you get a new card every hour or so but no actual gameplay otherwise to earn them.

I think this could be worked into games where you play, you work at it real hard, and congrats, you finally won the game. But that's not the end of it. As you went through the game you did not see all the secret paths and secret doors that opened up the rest of the game. Or perhaps you saw them but could not access them. Playing and winning the game might get you 25% of finding everything in the game.

It's up to you to play multiple times to find every and all secrets.

And of course for locating one or more of these hard-to-find secrets, you are rewarded with ? A Loot Box.

The Loot Box might have items that let the player jump higher to access areas they could not when they went through the first pass on the game. Perhaps swimming gear so they can finally dive in the water and not drown. Special boots to let them cross hot lava. Special weapons and/or armor, new playable characters, new NPCs to meet, new story paths to follow, you name it.

It could open up paths previously locked but now could be opened since the player has the matching key.

It could have collectable sprites that you can bring up to put on a shelf to view them in detail (with accompanying description) later. I think Brave Fencer Musashi has this ability.

https://youtu.be/oow6QlDqZ0M?t=192

Just like we collect prizes from Cracker Jack or a cereal box, they are collectable.

The Loot Box would have something in it, whether it's a platformer, racer, shooter, fighter, battler, RPG, puzzle, whatever it might be. It might have something in it that would help the player and encourage them to play your game "Just one more time" so they can explore that new area they couldn't earlier.

What are your thoughts ? And are there any existing Pico-8 games that do in fact have Loot Box prizes for outstanding ability or perseverance in gameplay ?

P#69573 2019-11-01 22:27 ( Edited 2019-11-02 18:04)

[ :: Read More :: ]

dt
by dw817
Cart #dt-0 | 2019-10-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
13


TO LOAD THIS CART, type the following in immediate mode:

load #dt

You've probably seen some pretty amazing things in graphic demos done for Pico-8, none to me more satisfying than the dither effect I've seen between two colors, where one side of the screen is black, the other white, and a complex and beautiful pattern between both showing a kind of fade ability using only the same-color pixels.

The fill pattern is by @Megus, and you can find his demoscene cart HERE:

https://www.lexaloffle.com/bbs/?tid=35774

Now while he and his crew have made an amazing demo, this tutorial and focus will be only on the dither technique used to create a division between two-colors. While it looks great on 3-dimensional models, it is also quite a thing of beauty to appear even on the screen just by itself.

So, exactly how is this being done ? And why is dithering an important element in graphics ?

First off, Pico-8 has an ability to "shade" pixels automatically with the FILLP() command, so that is how it is being done. Why is it important ? They give the illusion of varying degrees of shade between two colors. Let's take this picture for instance:

Now let's first off convert it to Pico-8's palette:

Obviously it loses some of its quality. But what about this ? Where the picture is comprised of only two colors, black and white ?

While you can adjust the brightness to show more detail, you are still limited to the lost pieces that are too dark or too light to show.

So, how can dithering help this ? Let's see a few. Here is a dither using what is called, ORDERED. It's good, fast, certainly better than straight out B&W, but could be improved upon.

In fact improving this default has always been a bit of a science and artistic thing. Perhaps the most common and popular is the Floyd-Steinburg method thus:

A dramatic improvement. You can find more about this favored method of converting multi-color pictures to a smaller palette, or even just B&W as seen HERE:

https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering

For further research there is also the Burkes and Stucki method, both included on this page:

.

https://en.wikipedia.org/wiki/Dither

But now let's get back to the code here.

What this does is create an array that holds 16-numbers. The dither table itself is stored in Sprites comprised of 4 8x8-pixeled sprites altogether. 8 4x4 patterns across at the top, and 8-more 4x4 patterns at the bottom, yielding 16 in all.

Each of them represent a "winking out" of each of the 4x4 pixels, where the BLUE pixel represents the pixel being added to the total "wink outs" so you can easily track them, or even develop your own. The background colors are there for a guide only.

[8x8]

The current selection of pixels and which are added at what position are done SO in such a precise and perfect way that when spread across the screen, creates a beautiful dithering effect. Which of course can be used to render 3-dimensional objects in Pico-8 with varying degrees of shades to emulate the lack of hardware colors inherent to Pico-8, or can be used simply to create a nice transition between two colors.

See the sourcecode for more details, chock full of remarks on how to code and write your own rectangular dithers and to fully understand the command FILLP(). Thus ends the tutorial.

HOPE THIS HELPS !

P#69408 2019-10-28 20:00 ( Edited 2019-10-28 21:11)

[ :: Read More :: ]

Cart #nine_keys-3 | 2019-10-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


TO LOAD THIS in Pico-8 type:

load #nine_keys

I am not at all certain if Pico-8 runs 100% correctly on Android and cellphones. I would like to think that if it is not, that @zep is certainly doing his level best to ensure that it can.

This program is fairly simple but opens up input, especially for a touchscreen Android and touchscreen cellphone.

I had originally worked this into a complex cellphone driven programming language earlier with 15 buttons in a 5x3 format, but the language is cumbersome, slow, and not at all user-friendly.

So I have put it here. You can test it with the mouse if you like.

6 buttons are already active.

  • Press the middle up for UP.
  • Press the middle left for LEFT.
  • Press the middle right for RIGHT.
  • Press the middle bottom for DOWN.
  • Press the top-left for INCREASE FOLLOWERS.
  • Press the top-right for DECREASE FOLLOWERS.

Press (X) by itself to swap between showing the nine buttons or hiding them.

And of course this program is using standard _init(), _draw(), and _update() chock full of remarks to guide you. So you can reconfigure all 9 of these buttons for your use and their definitions and actions.

HOPE THIS HELPS !

P#69369 2019-10-27 20:49 ( Edited 2019-10-28 04:21)

[ :: Read More :: ]

Cart #sufehasede-0 | 2019-10-25 | Code ▽ | Embed ▽ | No License

I was interested in making a type of high-number integer counter relying on the length and accuracy of 4-digit decimal numbers less than 1 when I came across this little slice of misfortune.

Here is the source to see there is no complication on my part:

-- real numbers are flawed!

function key()
  repeat
    flip()
  until btnp(4)
end

b=1
e=10

for i=1,5 do
  cls()
  ?"counting "..b.." to "..e.."."
  key()
  ?""
  for i=b,e,b do
    ?i
  end
  key()
  b/=10
  e/=10
end
?""
color(10)
?"complete!"
repeat
  key()
until forever

Any solutions on how to get the correct numbers here ? And ... does this error extend to LUA or just Pico-8 ?

P#69284 2019-10-25 23:39 ( Edited 2019-10-26 18:27)

[ :: Read More :: ]

Was curious to know if you could run and program modern Pico-8 (pico-8_0.1.12c) on this particular piece of hardware:

https://store.planetcom.co.uk/collections/devices/products/gemini-pda-1

Also, do you have Pico-8 running on something off the shelf of a desktop Windows computer ? If so feel free to reply with your findings, both positive and negative, on the portable device you run yours from.

... Or can you recommend some device outside of PocketCHIP that effectively runs Pico-8 and allows you to efficiently code on it besides ?

I'm trying to avoid any reviews of PocketCHIP as the keyboard and physical design look REALLY BAD. (can't fold it and looks like a puffed up membrane keyboard). :(

In all case, please include images, links, and/or prices of the other compatible hardware if they are not readily apparent.

Thanks !

P#69172 2019-10-22 18:56 ( Edited 2019-10-22 20:06)

[ :: Read More :: ]

Calculators have always fascinated me. For that matter numbers. Even before I could bring Dad's calculator to school I was busily working on paper with digits 0-9. Fascinated, just ... fascinated by what they meant, what they implied, and what they COULD mean with new definitions.

When I finally understood computers, I was quite interested. No, that's not the right word. I was OBSESSED. Obsessed to the point of mania would it could mean. What I could do. And what I could do with tools that worked with these numbers. Tools within tools. Numbers within numbers ...

So perhaps this is a work of love, real love, for the majesty and magnificence of numbers.

With that out of the way, let me show you what I have done.

I suppose it's a bit of a calculator, but with a difference. You can have ANY number of digits. And I mean any. Right now I have it scaled for 64-digits. That includes positive and negative.

Most importantly, it does NOT do it a single number at a time as you can tell. No, it truly does add and subtract every digit intelligently. So if you have 16-digits set. Then it will take no more than 5-loops or 80 looped statements to get the right value.

  • [1st loop] retrieve digits
  • [2nd loop] find largest numbers
  • [3rd loop] add digits (if adding)
  • [4th loop] subtract digits (if subtracting)
  • [5th loop] locate beginning of return value
  • [6th loop] send return value to variable

NOT 1-million loops to get a value of 1-million.

So far it's just addition and subtraction, but maybe that's because I don't really know how to write simple code to multiply or divide without a calculator or computer.

Anyways, it does addition and subtraction quite well, and as mentioned, with any number of digits. I'm not kidding about that.

mab
by dw817
Cart #mab-0 | 2019-10-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Try out the sample program included and you have a few controls available to you.

Press LEFT and RIGHT to increase and decrease randomly by several thousand.
Hold (O) and LEFT and RIGHT to do it 100 times over.

Tap (X) to double your value. This will rapidly increase the amount. Remember, I just have it keyed to work no more than 64-digits at the moment. You can always change that.

Tap UP to take out the last digit in your number. A good way to shrink the value.

Try this for a test.

Hold (O) and RIGHT to get it up to about 50-million.

Now hold (X) for a bit to see it dramatically increase by doubling the total each time. You can check my work with a calculator too if you want.

Seems to work well for positive numbers. Alright, either hold (O) and LEFT or UP to get the value back down. Test it for negative numbers now.

Here's where my hardest coding came in. To bounce back and forth between positive and negative WITHOUT getting the wrong value. Test it though, please. I want this to work right. I think it does. I hope it doesn't get any errors.

I feel a little like Willy Wonka developing a new candy. As he (Gene Wilder) said, "I don't think so. Few more tests."

Anyways, there you have it. A single function that you can use in your own code to count well past trillions. Definitely good for scoreboards or long-playing RPGs with huge experience point values.

Likely you can find other more interesting uses for it.

P#69113 2019-10-20 16:59 ( Edited 2022-10-19 21:55)

[ :: Read More :: ]

Cart #debug-2 | 2019-10-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4


to load this cart in Pico-8 immediate mode type:

load #debug-2

updated 10-18-19: Now works correctly no matter what the names of your functions are or even if you rename the debug() function itself.

Ah ! I bet you did not know about this ?

There is a command in Pico-8 that lets you see what function you are in as well as the line number ! Works with nested functions too, as deep as you please.

Debugging your code just got a lot easier.

Try out this sample program and feel free to use this function I put together to assist you. Every time you call DEBUG() it will display at the bottom of the screen what function called it and at what line number.

Big thanks to @Felice for introduction to trace() command which is neither listed in the Pico-8 manual nor the advanced manual. Sometimes things are just found like that. :)

HOPE THIS HELPS !

P#69039 2019-10-19 02:07 ( Edited 2019-10-19 04:34)

[ :: Read More :: ]

Sometimes you just can't get what you want by plotting sprites cause they may not be there or you've put a bunch of binary code on top of 'em. Sometimes you just MUST pixel.

Well, that's all good and well, and there's a few ways to go about it.

[1] Record every pixel in the area ahead of time and later plot it all out again.

[2] As above but only plot select pixels. In this case, do not plot black pixels.

[3] Unique method caching pixels. Explained later below.

[4] NEW ! Shoxidizer's Serializer.

[5] NEW ! Using PEEK and POKE.

Try this program I wrote:

by dw817
Cart #iymp-0 | 2019-10-18 | Code ▽ | Embed ▽ | No License


Use LEFT and RIGHT arrow keys to change drawing method.
Lots of moving and colorful sprites. It starts out in MODE 0, which is the 1st above.

. . .

In mode zero you can see above it records every pixel in the sprite and then plots back every single pixel without caring what color they are. For moving 100 sprites, this uses up 63% of your CPU.

. . .

Mode 1 is better and more intelligent. It like above records every pixel in the sprite area but when it comes back to plotting, it only plots pixels that are not color zero (black). This gives you a slight speed increase. Uses 52% of your CPU.

. . .

So what's going on with the cache method which is the fastest using only 32% of your CPU ? Let me see if I can explain.

Instead of using an array that is 8x8 in size to house every pixel, it creates a new single dimensional array that has 3-separate elements in it.

The first is the X-position in the pixel, the next is the Y-position, lastly the color.

So how is this different from the two above ?

Instead of going through 64-different pixels to see which is lit and which is not, it records the X/Y coordinates for each pixel plus the color and saves THAT as a single item in the array.

I'll let you think about that for a minute before giving an answer. Scroll down to see how it's done. No, I don't know how to hide text in Lex.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

So is this what you were expecting ? If so, congratulations, you got it right ! :D

Yes, THIS method of not only recording each pixel you want plotted but their exact X+Y coordinates runs quite a bit faster than the standard 8x8 sweeping method.

So there you have it.

HOPE THIS HELPS !

NOW DO YOU know of a faster way to plot individual pixels from a table or sprite sheet ?

P#69015 2019-10-18 18:16 ( Edited 2019-10-19 02:22)

[ :: Read More :: ]

What games have you had your eye on that you the most ?

This is by no means a complete list or in any any particular order, but these are definitely some games I thoroughly enjoy playing and playing again and will play again even after I have won them.


Wandering Magic - by @Overkill
Carmina - by @makz
A Messenger's Tale - by @JustFire45
Dungeo The Lich Queen - by @nephilim
Of Ineffable Nature - by @Jimmu
Jack Of Spades - by @BoneVolt
Dusk Child - by @SophieHoulden
Mai-Chan's Sweet Buns - by @Krystman
Celeste v0.1.2 - by @noel
Upward - by @matthias
Feed The Ducks - by @kittenm4ster
Just One Boss - by @bridgs
Minima 1.1.1 - by @Feneric
Dank Tomb - by @krajzeg
Alone In Pico - by @NuSan
Swordfish - by @chowyunbrent
Santa's Christmas Run - by @Tassilo
Charge! (LD39) 1.0 - by @DragonXVI
Kelin's Delivery - Rain v1.2.1 - by @NeithR
The Legend Of Bobby 0.7 - by @AbsolutRenal
The Green Legion v1.03 - by @guerragames
Buzzkill 1.4 - by @morningtoast
Eigengrau 0.1 - by @LeDjinn
Puzzle Cave I and II - by @hackefuffel
Tower Noire I - by @Cow

That's a page right there. I'll try to add more later.

How about you ? What are some of your Pico-8 game favorites ?

And what is it in them that makes them so enjoyable to play for you ? This information could and likely will help game developers across the globe - especially if they happen to be YOU. :)

P#69001 2019-10-18 03:02 ( Edited 2019-10-20 02:29)

[ :: Read More :: ]

by dw817
Cart #sots-2 | 2019-10-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


update: put helpful remarks in ALL of code now.

This is not a very complex cart, or perhaps it is.

The classic SNAKE game has been around for many years and during that time some innovative programmers have figured out unique, interesting, and compact ways of handling it.

It's not simply drawing a line, it creates a trail that disappears behind the player according to how far in the game they are.

There are many approaches to writing this. As for me, I have always opted to ID the entire screen, in this case, all 15x15 tiles and use a number to represent a part of the snake.

The higher the number the longer it will be in play. Albeit a lower number means it will vanish more quickly.

To update this I have a sweep of the entire playing area and if one of the tiles is a number that is greater to or equals one, then it decreases by one. So you need only plot a number behind where the player just was, to create this trail effect.

My question to you is how would =YOU= do it more efficiently ?

This is open to any and all programmers, not just you aces and veterans but those who are either learning to program in Pico-8 or have for a-while.

How would you code your SNAKE in the most efficient manner possible, and please, include the source.

Chances are one of us (likely me) will learn something from it. :)

P#68977 2019-10-17 19:57 ( Edited 2019-10-17 20:20)

[ :: Read More :: ]

stars in the galaxy.
Whoops, sorry, not that. No, something BETTER. Millions and billions of VALUES you can now use in Pico-8.

mib
by dw817
Cart #mib-0 | 2019-10-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


load this in Pico-8 immediate mode with:

load #mib-0

I understand there was a library made sometime ago that could increase a value to trillions, but it could not decrease, let alone go beyond 0 to negative numbers.

Well, I sat down and thought about it. Realized that getting past 0 is a tricky thing indeed. Especially going from 0 to a negative number and found at least for me a fairly simple solution to get around it.

So what do you have here ?

Well, in the demo hit LEFT and RIGHT to choose a positive or negative number to add or subtract to your total. And calculate the result every time you hit (O).

A program that lets you count up as high as you like, well past a billion or trillion using a STRING instead of a numeric variable. There is a catch though, and likely this is a limitation on my coding ability. You can only add or subtract up to 16383 at a time.

I'm not sure how to do it otherwise, but one advantage is if both numbers are ranged to 16383 or less, positive or negative, then the calculation is instant.

If not, it goes through my function and adds or subtracts properly and it defaults to 16-digits, or you can choose how many digits you want in your numbers if that's not enough.

Useful if you want to have a score over a long time or experience points for an RPG that surpass the 32767 barrier.

I have no doubt my code could be optimized further. :)

...

Wait. What the heck ?? It doesn't work correctly here but it does in Pico-8 ??
Well that's just EVIL. I had this problem in GFA-Basic years ago. My code would ran fine in the editor, compiled, didn't run properly. Augh ! Solution anyone ? Gotta be a bug @zep needs to squash.

Try for yourself to see it works perfect in the actual Pico-8 system.

P#68949 2019-10-17 02:29 ( Edited 2019-10-17 03:54)

[ :: Read More :: ]

Here is the latest, 10-18-19

brw
by dw817
Cart #brw-3 | 2019-10-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7


To load this in Pico-8, in the console immediate mode type:

load #brw-3

. . .

brw
by dw817
Cart #brw-2 | 2019-10-15 | Code ▽ | Embed ▽ | No License
7


(older version)

Hope you don't mind me starting a new thread. I literally had to rewrite more than half the code here so I think it's deserving of it.

And yes, it now has a proportionally spaced font.

New configuration in code lets you turn on/off shadow (runs a lot faster without).
Configure page and ink color too. And of course this will work with any text file, provided you have enough memory for it. Anything close to 19,000 chars will fit.

You have a few questions ? I have a few questions. :D

Would you like me to post an additional version that uses soft-sprites instead of individual pixel-plotting as it is now ?

The advantage will be the bookreader will run much faster even with shadowing, the disadvantage of course is you can't inject your own sprites over the set during reading.

Also I could make a version that just reads the text file by itself without poking it to sprite territory.

Further I have the font-writer with the sprite table of fonts I doodled. Do you like the proportionally spaced font or would you like to build one of your own for it ? You will need that tool.

Let me know, and thanks everyone who's helped me get as far in Pico-8 as I have today !

P#68907 2019-10-15 21:38 ( Edited 2019-10-18 20:16)

[ :: Read More :: ]

Now that I'm mixing and matching my metaphors in programming, metaphorically speaking of course, I'm running into some curious behavior by Pico-8.

For instance, take this code:

a="1"
b=2
?a+b

Which gives you 3, and that's fine.

But if you do this:

a="1"
b={1}
?b[a]

The result is NIL. Now I already know why it is because it's a string, but wouldn't it be easier for Pico (and possibly other programmers) to remove the number "type" completely and instead treat all variables as strings, only doing calculations when desired, and even then the results while visually appearing numerically are still just in truth a string ?

We already have ".." to show linking two strings together so there would be no difficulty with getting the "+" chosen correctly for calculations in determining whether or not it needs to be added to or appended to.

What problems would typecasting everything as a string cause ?

I can already see one advantage. Since strings can be any size this could also mean Pico-8 could be upgraded by @zep and allow numbers with any number of digits in them, both to the left and right of the decimal place. It would break the -32767.9999 and 32767.9999 barrier.

P#68887 2019-10-15 00:10 ( Edited 2019-10-15 01:09)

[ :: Read More :: ]

I'm still staying pretty busy here working on something else, but thought I would give this a go using the speed of the mapper to swap pages. See what you think:

Cart #yaaa256-0 | 2019-10-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

P#68854 2019-10-13 23:06

[ :: Read More :: ]

Hello !

I am excited to say that apparently it is indeed possible to copy and paste music from Pico-8 to the Lexaloffle BBS and it creates an awesome jukebox interface besides. Here for instance is an example from @zep's own Hello demo.

[sfx]

So how is it done ? Well, it's tricky and I'm surprised anyone managed to figure it out. To the best of my knowledge, @Gruber is one of the first.

https://www.lexaloffle.com/bbs/?tid=35640

So how can you do it ? First bring up Pico-8 that has the music you want to paste Online. Make sure you are in the MUSIC editor, not the SFX. Now click HERE on the zero zero:

Now click this pink arrow HERE until you can no longer see colored dots above the numbers:

In this case, it is track 11.

Now HOLD DOWN THE SHIFT KEY and click the very last number that has colored dots above it. A visual change will appear so it looks like THIS:

NOTICE the 9 and 10 are now GREEN. This means you can actually copy it now. Go press CTRL+C to copy all of this to the clipboard, it will work now.

Then in your message, hit CTRL+V to paste it. Do a preview and there it is, ready to play Online.

[sfx]

And that's it ! I think this will aid musicians out there to share their original music out there when all they want to do is have an Online jukebox for others to enjoy.

HOPE THIS HELPS !

P#68804 2019-10-12 17:43 ( Edited 2019-10-12 18:01)

View Older Posts